<%= form_for [:admin, @service_item], html: { class: "card" } do |f| %>
  <div class="card-body">
    <h3 class="card-title"><%= @service_item.new_record? ? "新增" : "修改" %>服务条款</h3>
    <div class="row">
      <div class="col-md-8">
        <div class="form-group">
          <label class="form-label">名字</label>
          <%= f.text_field :name, class: "form-control" %>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">图标</label>
          <div class="custom-file">
            <%= f.file_field :avatar, class: "custom-file-input" %>
            <label class="custom-file-label">选择文件</label>
          </div>
        </div>
      </div>
      
      <div class="col-md-12">
        <div class="form-group">
          <label class="form-label">描述</label>
          <%= f.text_area :description, class: "form-control" %>
        </div>
      </div>
    </div>
  </div>
  <div class="card-footer text-right">
    <button type="submit" class="btn btn-primary">保 存</button>
  </div>
<% end %>